<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>
    <title>纯CSS可折叠树状菜单</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <style type="text/css">
        body, ul, li{margin: 0;padding: 0;}
        body { background-color:#e4e9f1; color:#002446; margin: 0; }
        input, select, textarea, th, td { font-size: 1em; }
        ol.tree {padding: 0 0 0 30px;width: 300px;}
        li {position: relative;margin-left: -15px;list-style: none;}
        li.file{margin-left: -18px !important;}
        li.file a{background: url(document.png) 0 0 no-repeat;color: #002446;padding-left: 21px;text-decoration:none;display: block;}
        li input{position: absolute;left: 0;margin-left: 0;opacity: 0;z-index: 2;cursor: pointer;height: 1em;width:1em;top: 0;}
        input + ol{display: none;}
        input + ol > li { height: 0; overflow: hidden; margin-left: -14px !important; padding-left: 1px; }
        li label {cursor: pointer;display: block;padding-left: 17px;background: url(toggle-small-expand.png) no-repeat 0px 1px;}
        input:checked + ol {background: url(document.png) 44px 5px no-repeat;margin: -22px 0 0 -44px;padding:27px 0 0 80px;height: auto;display: block;}
        input:checked + ol > li { height: auto;}

    </style>
</head>
<body>

<ol class="tree">
    <li>
        <label for="folder1">服务</label> <input type="checkbox"  id="folder1" checked="checked" />
        <ol>

            <li>
                <label for="subfolder1">研发</label> <input type="checkbox" id="subfolder1" />
                <ol>
                    <li class="file"><a href="">SMO</a></li>
                    <li>
                        <label for="subsubfolder1">供应商清单</label> <input type="checkbox" id="subsubfolder1" />
                        <ol>

                            <li class="file"><a href="">下级</a></li>
                            <li>
                                <label for="subsubfolder2">下级</label> <input type="checkbox" id="subsubfolder2" />
                                <ol>
                                    <li class="file"><a href="">无限级</a></li>
                                    <li class="file"><a href="">无限级</a></li>
                                    <li class="file"><a href="">无限级</a></li>

                                    <li class="file"><a href="">无限级</a></li>
                                    <li class="file"><a href="">无限级</a></li>
                                    <li class="file"><a href="">无限级</a></li>
                                </ol>
                            </li>
                        </ol>
                    </li>

                    <li class="file"><a href="">下级</a></li>
                    <li class="file"><a href="">下级</a></li>
                    <li class="file"><a href="">下级</a></li>
                    <li class="file"><a href="">下级</a></li>
                </ol>
            </li>
        </ol>

    </li>
    <li>
        <label for="folder2">水产养殖</label> <input type="checkbox" id="folder2" />
        <ol>
            <li class="file"><a href="">实时数据</a></li>
            <li>
                <label for="subfolder2">实时数据</label> <input type="checkbox" id="subfolder2" />
                <ol>

                    <li class="file"><a href="">下级</a></li>
                    <li class="file"><a href="">下级</a></li>
                    <li class="file"><a href="">下级</a></li>
                    <li class="file"><a href="">下级</a></li>
                    <li class="file"><a href="">下级</a></li>
                    <li class="file"><a href="">下级</a></li>

                </ol>
            </li>
        </ol>
    </li>
</ol>

</body>
</html>